package config

type Configuration struct {
	Server   Server
	Database Database
	WX       WX
	Redis    Redis
	Email    Email
}
type Server struct {
	Port         string `json:"port" yaml:"port" mapstructure:"port"`
	AccessExpire int64  `json:"accessExpire" yaml:"accessExpire" mapstructure:"accessExpire"`
	KEY          string `json:"key" yaml:"key" mapstructure:"key"`
	LOCAL        string `json:"local" yaml:"local" mapstructure:"local"`
}

type Database struct {
	UserName string `json:"username" yaml:"username" mapstructure:"username"`
	PassWord string `json:"password" yaml:"password" mapstructure:"password"`
	Address  string `json:"address" yaml:"address" mapstructure:"address"`
	Port     string `json:"port" yaml:"port" mapstructure:"port"`
	DBname   string `json:"dbname" yaml:"dbname" mapstructure:"dbname"`
}

type Email struct {
	Mail string `json:"mail" yaml:"mail" mapstructure:"mail"`
	Code string `json:"code" yaml:"code" mapstructure:"code"`
}

type WX struct {
	APPID  string `json:"appid" yaml:"appid" mapstructure:"appid"`
	SECRET string `json:"secret" yaml:"secret" mapstructure:"secret"`
}

type Redis struct {
	Addr     string `json:"addr" yaml:"addr" mapstructure:"addr"`
	Port     string `json:"port" yaml:"port" mapstructure:"port"`
	Password string `json:"password" yaml:"password" mapstructure:"password"`
	DB       int    `json:"DB" yaml:"db" mapstructure:"db"`
}
